<template>
  <div>
     <nav-bar>
       <div slot="title">我的订单</div>
     </nav-bar>
     <tab-control class="tab" :title="['未签收','已签收']" @tabClick="tabClick"></tab-control>

	 <scroll class="scroll" ref="scroll">
	   <list :goods="goods"></list>
	 </scroll>
  </div>
</template>

<script>
  import navBar from './components/navBar.vue'
  import list from './components/orderList.vue'

  import scroll from 'components/common/scroll/scroll.vue'
  import tabControl from 'components/content/Tab/TabControl'
  import {debounce} from '../../../common/utils.js'
  export default{
    name:'',
    data(){
      return {
          goods:[]
       }
    },
    methods:{
      refresh(){
        debounce(this.$refs.scroll.refresh,10)
      },
      tabClick(){
        this.$bus.$emit("changeOrderStatus")
      }
    },
    components:{
       navBar,list,scroll,tabControl
    },
    activated() {
      this.refresh()
    }
  }
</script>

<style scoped>
  .scroll{
    height: calc(100vh - 44px - 46px - 40px);
    position: relative;
    overflow: hidden;
    /* top: 44px; */
  }
  .tab{
    box-shadow: 0 0 1px 1px rgba(211,211,211,0.4);
    width: 100%;
    top: 44px;
    z-index: 9;
  }
</style>
